<form id="form-psw">
	<table  class="dialog-table table">
		<tr>
			<th>登录密码:</th>
			<td><input name="oldPassWord" type="password" class="form-control validate[required]"
				placeholder="请输入原始登录密码" data-errormessage-value-missing="请输入原始登录密码"></td>
		</tr>
		<tr>
			<th>新密码:</th>
			<td><input name="newPassWord" type="password" placeholder="6到18位字符数字或下划线"
				class="form-control validate[required,minSize[6],maxSize[18]]" id="newPsw"
				data-errormessage-value-missing="请输入新登录密码"
				data-errormessage-range-underflow="密码少于6位"
				data-errormessage-range-overflow="密码长度超出限制(18位)"></td>
		</tr>
		<tr>
			<th>再次确认密码:</th>
			<td><input name="passWordReg" type="password"  placeholder="请再次输入新密码"
				 class="form-control validate[required,equals[newPsw]]"
				 data-errormessage-value-missing="请再次输入新登录密码"
				 data-errormessage-pattern-mismatch="两次密码不一致"></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
$("#form-psw").validationEngine({
	promptPosition : 'topLeft',
	maxErrorsPerField : 1,
	showOneMessage:true
});
Dialog.saveBtn.on("click",function(){
	if($("#form-psw").validationEngine('validate')){
		callSvr("AccountManage/modifiyPassword", $("#form-psw").formToJson(),function(result) {
			if (result.err == 0) {
				alert('修改成功,请重新登录');
				Dialog.exit();
				logout();
			} else if (result.err == 1) {
				toastr.error('旧密码不正确！', '');
			}
		});
	}
});
</script>